<#compress>
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta content="yes" name="apple-mobile-web-app-capable" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style" />
    <meta name="viewport" content="width=device-width,initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
    <title>店铺介绍</title>
    <link rel="stylesheet" type="text/css" href="${ctx}/static/mobileweb/2/css/style.css?_=${.now?string("yyyy-MM-dd")}">

</head>
<body>
<div class="shop-top">
    <input type="hidden" value="${sb.brandId!}" name="id" id="id"/>

    <div id="slideBox" class="slideBox">
        <div class="bd">
            <ul>
                <#if pics??>
                    <#list pics as pic>
                    <li>
                        <a class="pic" href="${ctx}/mobileweb/brand/goods?id=${sb.brandId!}"><img style="max-height: 154px;" src="${ctx}${pic}" /></a>
                    </li>
                    </#list>
                <#else>
                    <li>
                        <a class="pic" href="${ctx}/mobileweb/brand/goods?id=${sb.brandId!}"><img style="max-height: 154px;" src="${ctx}/static/mobileweb/images/share.png" /></a>
                    </li>
                </#if>
            </ul>
        </div>

        <div class="hd">
            <ul></ul>
        </div>

        <div class="copLogo">
            <#if sb.logo??>
                <img src="${ctx}/${sb.logo!}"/>
            <#else>
                <img src="${ctx}/static/mobileweb/images/logo.png"/>
            </#if>
        </div>

        <div class="s-loc clearfix">
            <span class="fl loc-L" id="location"><img src="${ctx}/static/mobileweb/2/images/sLocIco.png" alt=""><span class="mr32">位置：${sb.floorName!}</span><span>${sb.location!}</span></span>
            <span class="fr loc-R"><span class="mr30"><img src="${ctx}/static/mobileweb/2/images/sLikeBtn.png" alt=""></span><span id="stats"><#if sb.stats??> ${sb.stats} <#else>0</#if></span></span>
        </div>

    </div>
</div>

<div class="shop-cnt">
    <div class="shop-head clearfix">
        <div class="btn-follow hbox fl" id="attention" attention="${sb.attention?c}" mid="${mid!}" wxno="${wxno!}">
            <#if sb.attention>
                <img src="${ctx}/static/mobileweb/2/images/sFollowBtn-del.png" alt=""><span>取消关注</span>
            <#else >
                <img src="${ctx}/static/mobileweb/2/images/sFollowBtn.png" alt=""><span>立即关注</span>
            </#if>
        </div>
        <div class="btn-tel hbox fr">
            <img src="${ctx}/static/mobileweb/2/images/sTelIco.png" alt=""  id="phone-call" data-phone="${sb.contact!}"><#if sb.contact??> ${sb.contact!}<#else><span> 暂无电话</span></#if>
        </div>
    </div>
    <div class="shop-act boder-dec clearfix">
        <h2><img src="${ctx}/static/mobileweb/2/images/sGiftIco.png" alt="">&nbsp;&nbsp;品牌活动</h2>
        <#if activity??>
            <a href="${ctx}/mobileweb/brand/activity?brandid=${id!}&mid=${mid}&wxno=${wxno}"><span>${activity.name!}</span><img src="${ctx}/static/mobileweb/2/images/arrow-btn.png" alt=""></a>
        <#else>
            <a href="javascript:void(0);"><span>暂无活动</span></a>
        </#if>
    </div>
    <div class="shop-info boder-dec clearfix">
        <a href="#"><span>店铺介绍</span><img src="${ctx}/static/mobileweb/2/images/arrow-btn.png" alt=""></a>
        <p>${sb.description!}</p>
    </div>

</div>

<script src="${ctx}/static/mobileweb/scripts/jquery-1.7.2.min.js"></script>
<script src="${ctx}/static/mobileweb/scripts/TouchSlide.1.1.js"></script>
<script type="text/javascript">

    document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
        WeixinJSBridge.call('hideToolbar');
    });
    TouchSlide({
        slideCell:"#slideBox",
        titCell:".hd ul", //开启自动分页 autoPage:true ，此时设置 titCell 为导航元素包裹层
        mainCell:".bd ul",
        effect:"leftLoop",
        autoPage:true,//自动分页
        autoPlay:true //自动播放
    });

    $(function () {
        var id = $('#id').val() || 0;
        var ctx = '${ctx}';
        $('#attention').click(function () {
            var _this = this;
            var attention = $(_this).attr("attention");
            var mid = $(_this).attr("mid");
            var wxno = $(_this).attr("wxno");

            $.post('${ctx}/mobileweb/brand/follow', {id: id, attention: attention, mid: mid, wxno: wxno}, function (msg) {
                $('#stats').html(msg.data);
                if (attention == 'true') {
                    $(_this).find('img').attr("src","${ctx}/static/mobileweb/2/images/sFollowBtn.png");
                    $(_this).find('span').html("立即关注");
                    $(_this).attr("attention", 'false');
                } else {
                    $(_this).find('img').attr("src","${ctx}/static/mobileweb/2/images/sFollowBtn-del.png");
                    $(_this).find('span').html("&nbsp; 取消关注");
                    $(_this).attr("attention", 'true');
                }

            });
        });

        $('#phone-call').click(function () {
            var phone = $(this).data('phone');
            if (phone) {
                window.location.href = "tel://" + phone;
            }
        });

        $('#location').click(function(e){
            e.preventDefault();
            window.location.href='${ctx}/mobileweb/brand/road/${sb.brandId!}';
        })
    });

</script>
</body>
</html>
</#compress>